package com.ruoyi.function.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单对象 orders
 *
 * @author ruoyi
 * @date 2025-03-21
 */
@Data
public class Orders extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单唯一标识 */
    private Long orderId;

    /** 关联用户表 */
    @Excel(name = "母订单")
    private Long parentOrder;
    /** 关联用户表 */
    @Excel(name = "关联用户表")
    private Long userId;

    /** 订单总金额 */
    @Excel(name = "订单总金额")
    private BigDecimal totalAmount;

    /** 支付方式 */
    @Excel(name = "支付方式")
    private String paymentMethod;

    /** 订单状态（0：待付款 1：待接单 2：已接单 3：已完成 4：已退款） */
    @Excel(name = "订单状态", readConverterExp = "0=：待付款,1=：待接单,2=：已接单,4=：已取消,5.已完成 6：已退款 7:已评价")
    private String orderStatus;
    private String[] orderStatusArray;

    /** 服务类型 */
    @Excel(name = "服务类型")
    private String serviceTypeId;
    private String serviceTypeName;

    /** 预约时间 */
    private String appointmentTime;

    /** 工时 */
    @Excel(name = "工时")
    private BigDecimal workingHours;

    /** 定位 */
    @Excel(name = "定位")
    private String positioning;

    /** 经度 */
    @Excel(name = "经度")
    private BigDecimal longitude;

    /** 纬度 */
    @Excel(name = "纬度")
    private BigDecimal latitude;

    /** 是否自备配件 （0：是1：否） */
    @Excel(name = "是否自备配件 ", readConverterExp = "0=：是1：否")
    private String hasAccessory;

    /** 接单人 */
    @Excel(name = "接单人")
    private Long ordersUser;

    /** 照片 */
    @Excel(name = "照片")
    private String photos;

    /** 接单类型（2：个人，3商家） */
    @Excel(name = "接单类型", readConverterExp = "2=：个人，3商家")
    private String receivingType;

    /** 客户评价 */
    @Excel(name = "客户评价")
    private String evaluation;

    /** 客户评分 */
    @Excel(name = "客户评分")
    private String ratings;  /** 客户评分 */
    @Excel(name = "订单类型") //订单类型（0：不是额外订单  1：额外订单）
    private String type;
    @Excel(name = "支付时间")
    private Date paymentTime;



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("orderId", getOrderId())
                .append("userId", getUserId())
                .append("totalAmount", getTotalAmount())
                .append("paymentMethod", getPaymentMethod())
                .append("orderStatus", getOrderStatus())
                .append("serviceTypeId", getServiceTypeId())
                .append("appointmentTime", getAppointmentTime())
                .append("workingHours", getWorkingHours())
                .append("positioning", getPositioning())
                .append("longitude", getLongitude())
                .append("latitude", getLatitude())
                .append("hasAccessory", getHasAccessory())
                .append("ordersUser", getOrdersUser())
                .append("photos", getPhotos())
                .append("receivingType", getReceivingType())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("evaluation", getEvaluation())
                .append("ratings", getRatings())
                .toString();
    }
}
